import request from '@/utils/request'

// 分页列表
export function dictDataList(data) {
  return request({
    url: '/system/dict/data/dictDataList',
    method: 'post',
    data
  })
}

// 查询详情
export function getData(id) {
  return request({
    url: '/system/dict/data/' + id,
    method: 'get'
  })
}

// 根据字典类型查询字典数据信息
export function dictType(dictType) {
  return request({
    url: '/system/dict/data/type/' + dictType,
    method: 'get'
  })
}

// 新增
export function add(data) {
  return request({
    url: '/system/dict/data/add',
    method: 'post',
    data
  })
}

// 修改
export function edit(data) {
  return request({
    url: '/system/dict/data/edit',
    method: 'put',
    data
  })
}

// 删除
export function remove(ids) {
  return request({
    url: '/system/dict/data/' + ids,
    method: 'delete'
  })
}
